<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<form action="#" method="post">
    <p>
        <!-- requeird必填字段-->
        <span>银行账号：</span>
        <input type="text" class="inputsgl" required
               onkeypress="javascript:if (event.keyCode == 32)event.returnValue=false;"
               onkeyup="this.value=this.value.replace(/\s+/g,'')">
    </p >
</form>
</body>
</html>